<template>
    <div @click="helloClick">父组件</div>
    <Zi ref="hello"></Zi>
</template>

<script setup>
import { ref } from 'vue'
import Zi from './Zi.vue'

const hello = ref(null)

const helloClick = () => {
    console.log(hello.value.count) // 123456
    hello.value.testFun()
}
</script>